// 数据库连接实例
const config = require("@/config/config.json")
const serverConfig = require("@/config/serverConfig.json")
const mysql = require('mysql');
let connection = null;
if(process.env.NODE_ENV == "development"){
  connection = mysql.createConnection(config)
}else{
  connection = mysql.createConnection(serverConfig)
}
connection.connect();
module.exports = connection; //导出连接实例